﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.ComponentModel;

namespace CommunitySystem
{
    public class UploadFileInfo: INotifyPropertyChanged
    {
        /// <summary>
        /// 存储文件名
        /// </summary>
        public string Name { get; set; }

        private string _xingmin;
        public string XingMin
        {
            get { return _xingmin; }
            set
            {
                _xingmin = value;
                this.OnPropertyChanged("XingMin");
            }
        }

        /// <summary>
        /// 原名
        /// </summary>
        public string DisplayName { get; set; }
        
        /// <summary>
        /// 文件大小
        /// </summary>
        public double Size { get; set; }
        /// <summary>
        /// 上传完成状态
        /// </summary>
        public double CompletedStatus { get; set; }
        /// <summary>
        /// 文件流
        /// </summary>
        public List<byte[]> Context { get; set; }

        /// <summary>
        /// FilesID
        /// </summary>
        public int FilesID { get; set; }

        /// <summary>
        /// 记录Context的最大数
        /// </summary>
        public int parts { get; set; }

        private int _currentNo;

        public int CurrentNo
        {
            get { return _currentNo; }
            set
            {
                _currentNo = value;
                this.OnPropertyChanged("CurrentNo");
            }
        }

        private string _HasFinished;

        public string HasFinished
        {
            get { return _HasFinished; }
            set
            {
                _HasFinished = value;
                this.OnPropertyChanged("HasFinished");
            }
        }

        private int _status = 1;

        public int status
        {
            get { return _status; }
            set { _status = value; }
        }

        private List<string> _UploadString = new List<string>();

        public List<string> UploadString
        {
            get { return _UploadString; }
            set { _UploadString = value; }
        }
        
          
        

        public event PropertyChangedEventHandler PropertyChanged;

        public void OnPropertyChanged(string PropName)
        {
            if (PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(PropName));
            }
        }
    }
}
